#pragma once

/*
@author: TriLVH
@description: bulllet to damage 
*/

#include "AbstractData.h"

#define _STATE_BULLET_1 1
#define _BULLET_1_WIDTH 12
#define _BULLET_1_HEIGHT 12

class BulletData : public AbstractData {
private:
	void initSprite() {
		sprites->addSprite(_STATE_BULLET_1, type);
		sprites->setState(_STATE_BULLET_1);
	}

public:
	BulletArmies bulletArmy;
	/* Direction of bullet when it fired */
	int direction;
	int distanceForLive;
	/* Actor that create bullet */
	Rect* actor;
	/* The target of bullet if it fired by army */
	Rect* target;
	bool isHalf;
	/* Start point */
	double startX;
	double startY;

	BulletData(int id, int type, double x, double y, int direction, Rect* actor, Rect* target, BulletArmies bulletArmy, bool isHalf, int distanceForLive);

	void initSpriteHandler(LPD3DXSPRITE spriteHandler);

	void initData();

	~BulletData() {
		//delete actor;
		//delete target;
	}
};